const { Sequelize } = require('sequelize');
const mysql=require("mysql2/promise")

const sequelize = new Sequelize('Yjhbk', 'root', 'root', {
    host: 'localhost',
    dialect:"mysql"
  });

  module.exports = sequelize;


(async function(){
    try {
        await sequelize.authenticate();
        console.log('Connection has been established successfully.');
    } catch (error) {
        console.error('Unable to connect to the database:', error);
    }
})()